from appium.webdriver.common.mobileby import MobileBy

from HomeWork_PO_Apptest_add_and_delete_members.base.base_page import BasePage
from HomeWork_PO_Apptest_add_and_delete_members.page.addresslist_page import AddressListPage


class MainPage(BasePage):
    def goto_addresslist(self):
        #点击 ‘通讯录’按钮，即可跳转到 联系人列表页，同时记得将driver传过去
        self.driver.find_element(MobileBy.XPATH,'//*[@text="通讯录"]').click()
        return AddressListPage(self.driver)